package com.hzpd.hainan.utils;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

import com.hzpd.hainan.model.video.VideoItemBean;
import com.hzpd.hainan.module.MainActivity;
import com.hzpd.hainan.module.WelcomeActivity;
import com.hzpd.hainan.module.news.activity.MyEditColumnActivity;
import com.hzpd.hainan.module.news.activity.SeachActivity;
import com.hzpd.hainan.module.usercenter.acticity.LoginActivity;
import com.hzpd.hainan.module.video.activity.VideoDetailActivity;

/**
 * Created by 猪猪侠 on 2017/7/3.
 */

public class PageCtrl {
    public static void start2WelcomeActivity(Activity context){
        Intent intent = new Intent(context, WelcomeActivity.class);
        context.startActivity(intent);
        AAnim.ActivityStartAnimation(context);
    }
    public static void start2MainActivity(Activity context){
        Intent intent = new Intent(context, MainActivity.class);
        context.startActivity(intent);
        AAnim.ActivityStartAnimation(context);
    }
    public static void start2EditColumnActivity(Activity context){
        Intent intent = new Intent(context, MyEditColumnActivity.class);
        context.startActivity(intent);
        AAnim.ActivityStartAnimation(context);
    }
    public static void start2SearchActivity(Activity context){
        Intent intent = new Intent(context, SeachActivity.class);
        context.startActivity(intent);
        AAnim.ActivityStartAnimation(context);
    }
    public static void start2LoginActivity(Activity context){
        Intent intent = new Intent(context, LoginActivity.class);
        context.startActivity(intent);
        AAnim.ActivityStartAnimation(context);
    }

    public static void start2VideoPlayActivity(Activity context, String from, VideoItemBean videoItemBean){
        Intent intent = new Intent(context, VideoDetailActivity.class);
        intent.putExtra("from",from);
        intent.putExtra("videoItemBean",videoItemBean);
        context.startActivity(intent);
        AAnim.ActivityStartAnimation(context);
    }


}
